#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main() {
	int num = 1;
	int n;
	int arr[100] = { 0 };
	arr[0] = 1;
	arr[1] = 1;
	int arr1[100] = { 0 };
	arr1[0] = 1;
	arr1[1] = 1;
	scanf("%d", &n);

	for (int i = 0; i <= n; i++) {
		for (int m = 0; m <= i; m++) {
			arr1[m] = arr[m];
		}
		if (i > 1) {
			for (int z = 0; z <= i - 1; z++) {
				if (z > 0) {

					arr[z] = arr1[z - 1] + arr1[z];

					arr[i] = 1;
					arr1[i] = 1;

				}
			}
		}
		for (int j = 0; j <= i; j++) {

			printf("%d ", arr[j]);
		}


		printf("\n");

	}
	return 0;
}